package com.hyy.baseproject.tools;

import com.hyy.baseproject.R;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.Bundle;
import android.widget.TextView;

public class CustomerProgress extends ProgressDialog {

	private String mMsg;
	private TextView mTvMsg;
	private JumpingBeans jumpingBeans;

	public CustomerProgress(Context context, String msg) {
		super(context);
		mMsg = msg;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dialog_layout);
		mTvMsg = (TextView) findViewById(R.id.tv_pro);
		if (!mMsg.equals("") && mMsg != null) {
			mTvMsg.setText(mMsg);
		}
		jumpingBeans = new JumpingBeans.Builder().appendJumpingDots(
				mTvMsg).build();
	}
	
	@Override
	public void dismiss() {
		super.dismiss();
		jumpingBeans.stopJumping();
	}

}
